/**
 * Created by XPL on 2017/4/19.
 */
angular.module('app').directive('appPositionHead', [function () {
    return {
        restrict: 'A',
        replace: true,
        transclude: true,
        scope: {
            title: '@'
        },
        link: function (scope) {
            scope.back = function () {
                window.history.back();
            }
            scope.$on('abc', function(event, data) {
               console.log(event);
               console.log(data);
            });
            scope.$emit('parentEvent',{name:2}); //向上事件广播

        },
        templateUrl: 'view/template/position-head.html'
    };
}])